package com.hllxd.hism.star.basic.service.constant.alarm;

/**
 * @description 累计值比较类型
 * @auhtor wuguangxi
 * @date 2022/2/10 15:11
 **/
public enum CompareTypeEnum {

    MORE("more", "多于"),
    LESS("less", "少于");

    private final String code;

    private final String name;

    CompareTypeEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static CompareTypeEnum getByCode(String code){
        for(CompareTypeEnum compareTypeEnum : CompareTypeEnum.values()){
            if(compareTypeEnum.getCode().equals(code)){
                return compareTypeEnum;
            }
        }
        return null;
    }
}
